package me.dqn.noway.bean;

import me.dqn.noway.precenter.MyPresenter;

public class NoWayContext {
    // singleton instance.
    private static NoWayContext INSTANCE = null;
    // password user
    private PasswordUser passwordUser = null;

    private MyPresenter myPresenter = null;

    private NoWayContext() {
    }

    // singleton design pattern
    public static NoWayContext getINSTANCE() {
        if (INSTANCE == null) {
            synchronized (NoWayContext.class) {
                if (INSTANCE == null) {
                    INSTANCE = new NoWayContext();
                }
            }
        }
        return INSTANCE;
    }

    public PasswordUser getPasswordUser() {
        return passwordUser;
    }

    public void setPasswordUser(PasswordUser passwordUser) {
        this.passwordUser = passwordUser;
    }

    public MyPresenter getMyPresenter() {
        return myPresenter;
    }

    public void setMyPresenter(MyPresenter myPresenter) {
        this.myPresenter = myPresenter;
    }
}
